package com.agileboot.domain.airport.inspection.db;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 检查计划表 服务实现类
 * </p>
 *
 * @author valarchie
 * @since 2025-07-10
 */
@Service
public class SirInspectionServiceImpl extends ServiceImpl<SirInspectionMapper, SirInspectionEntity> implements SirInspectionService {
    @Override
    public List<SirInspectionEntity> getByIds(List<Long> ids) {
        if (ids == null || ids.isEmpty()) {
            return List.of(); // 返回空列表而不是 null，避免空指针
        }

        LambdaQueryWrapper<SirInspectionEntity> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(SirInspectionEntity::getInspectionId, ids);
        return this.list(queryWrapper);
    }
}